/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.cibertec.dawii.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Manuel Eguiluz
 */
@Embeddable
public class StaffSkillPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "skill_code", nullable = false)
    private int skillCode;
    @Basic(optional = false)
    @Column(name = "support_staff", nullable = false)
    private int supportStaff;

    public StaffSkillPK() {
    }

    public StaffSkillPK(int skillCode, int supportStaff) {
        this.skillCode = skillCode;
        this.supportStaff = supportStaff;
    }

    public int getSkillCode() {
        return skillCode;
    }

    public void setSkillCode(int skillCode) {
        this.skillCode = skillCode;
    }

    public int getSupportStaff() {
        return supportStaff;
    }

    public void setSupportStaff(int supportStaff) {
        this.supportStaff = supportStaff;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) skillCode;
        hash += (int) supportStaff;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof StaffSkillPK)) {
            return false;
        }
        StaffSkillPK other = (StaffSkillPK) object;
        if (this.skillCode != other.skillCode) {
            return false;
        }
        if (this.supportStaff != other.supportStaff) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.cibertec.dawii.entity.StaffSkillPK[ skillCode=" + skillCode + ", supportStaff=" + supportStaff + " ]";
    }
    
}
